<template>
    <div class="userinfo">
        <h3>我是个人信息组件</h3>
        <p>姓名: {{ username  }}</p>
        <p>年纪: {{ age }}</p>
        <p>是否单身: {{ isSingle }}</p>
        <p>座驾: {{ car.brand }}</p>
        <p>爱好: {{ hobby.join(', ') }}</p>
    </div>
</template>

<script>
export default {
    props: ['username', 'age', 'isSingle', 'car', 'hobby'],
    data() {
        return {
        }
    },
    methods: {
    }
}
</script>

<style scoped>
.userinfo {
    border: 3px solid black;
    padding: 20px;
}
</style>